<?php
namespace app\helpers;

use app\models\Access as mAccess;
use app\models\Login as mLogin;

/**
 * 权限控制
 */
class Access{
    
    /**
     * 获取登录用户二级菜单树目录
     */
    public static function panelTree(){
        
        $mAccess = new mAccess();
        return $mAccess->panels();    
    }
    
    /**
     * 登录信息获取
     */
    public static function loginInfo(){
        
        $mLogin = new mLogin();
        return $mLogin->loginInfo();
        
    }
    
    /**
     * 当前菜单的访问权限
     * @return boolean 
     */
    public static function access(){
        
        $mAccess = new mAccess();
        return $mAccess->access();
    }
    
}
